<?php
define('MINI_RUN', true);
require 'mini.php';
Mini::checkLogin();
?>
<!DOCTYPE html>
<html>
<head>
<title>添加提示--<?=Mini::NAME?>后台管理系统</title>
<?=Mini::ADMIN_CSS?>
</head>
<body>
<p class="msg">&nbsp;</p>
<form>
<input name="op" type="hidden" value="adddata" />
<p>选择所属栏目*：
<select name="classid" id="classid">
<option value="null">请选择</option>
<?=Mini::getsubclass()?>
</select>
</p>
<p>显示Ajax提示的索引值*：<input name="datakey" id="datakey" type="text" /></p>
<p>显示Ajax提示的具体词汇*：<input name="datavalue" id="datavalue" type="text" /></p>
<p>显示的Ajax提示内容*：</p>
<p><textarea name="datadesc" id="datadesc" rows="20" cols="80"></textarea></p>
<p><input id="addbtn" type="button" value="添加" /></p>
</form>
<?=Mini::JQUERY_JS?>
<?=Mini::ADMIN_JS?>
<script type="text/javascript">
$(function(){
	$("#addbtn").click(function(){
		if(checkValue("#datakey","提示的索引值")) return false;
		if(checkValue("#datavalue","提示的具体词汇")) return false;
		if(checkValue("#datadesc","提示内容")) return false;
		if(checkSelect("#classid","提示所属栏目")) return false;
		if(checkExists(<?=Mini::AJAX_GET?>,{op:"checkdata",datakey:$("#datakey").val(),datavalue:$("#datavalue").val()},"索引值或具体词汇")) return false;
		setAction(<?=Mini::AJAX_SET?>, $("form").serialize(), "添加资料");
	});
});

</script>
</body>
</html>